gtk4.git
5 years agoAdd a forgotten export
Matthias Clasen [Sun, 31 May 2020 20:47:53 +0000 (16:47 -0400)]
Add a forgotten export

gtk_column_view_sort_by was missing a GDK_AVAILABLE_IN_ALL
annotation, causing it to not be exported.

5 years agoMerge branch 'column-visible' into 'master'
Matthias Clasen [Sun, 31 May 2020 20:39:06 +0000 (20:39 +0000)]
Merge branch 'column-visible' into 'master'

columnview: Add a GtkColumnViewColumn:visible property

See merge request GNOME/gtk!1997

5 years agoMerge branch 'drop-coverflow' into 'master'
Emmanuele Bassi [Sun, 31 May 2020 19:12:32 +0000 (19:12 +0000)]
Merge branch 'drop-coverflow' into 'master'

Drop GtkCoverFlow for now

See merge request GNOME/gtk!2000

5 years agoUpdate Ukrainian translation
Yuri Chornoivan [Sun, 31 May 2020 19:05:20 +0000 (19:05 +0000)]
Update Ukrainian translation

5 years agoMerge branch 'drop-fallback-c89' into 'master'
Matthias Clasen [Sun, 31 May 2020 18:14:14 +0000 (18:14 +0000)]
Merge branch 'drop-fallback-c89' into 'master'

Drop fallback-c89.c

See merge request GNOME/gtk!1999

5 years agoMerge branch 'matthiasc/for-master' into 'master'
Matthias Clasen [Sun, 31 May 2020 18:13:36 +0000 (18:13 +0000)]
Merge branch 'matthiasc/for-master' into 'master'

Matthiasc/for master

See merge request GNOME/gtk!1995

5 years agoDrop GtkCoverFlow for now
Matthias Clasen [Sun, 31 May 2020 17:11:35 +0000 (13:11 -0400)]
Drop GtkCoverFlow for now

There is no agreement that a coverflow widget is
appropriate for GTK 4.

It would be ok as a demo if it could live in gtk-demo,
but that requires us to make GtkListBase public first.
The demo is also somewhat rough and needs more work
to look plausible.

Drop GtkCoverFlow and the related demo for now.

5 years agogtk-demo: Fixes for the sliding puzzle
Matthias Clasen [Sun, 31 May 2020 15:02:36 +0000 (11:02 -0400)]
gtk-demo: Fixes for the sliding puzzle

We were calling check_solved only for key presses,
meaning you could never solve the puzzle with the
mouse.

5 years agogtk-demo: Some fixes to awards
Matthias Clasen [Sun, 31 May 2020 14:45:22 +0000 (10:45 -0400)]
gtk-demo: Some fixes to awards

Fix things up enough to make the list show up.
Still not a working example, but closer.

5 years agoprinter: Fix the default value of icon-name
Matthias Clasen [Sun, 22 Dec 2019 23:09:07 +0000 (18:09 -0500)]
printer: Fix the default value of icon-name

Just set this to "printer", so we don't have
to fix it up in the print dialog.

5 years agoprintbackend: Add a list model getter
Matthias Clasen [Sun, 22 Dec 2019 19:49:26 +0000 (14:49 -0500)]
printbackend: Add a list model getter

Now that we have a list model for printers,
we can start using it.

5 years agoprintbackend: Use a list store
Matthias Clasen [Sun, 22 Dec 2019 19:43:48 +0000 (14:43 -0500)]
printbackend: Use a list store

5 years agogtk-demo: Add more scrolling benchmarks
Matthias Clasen [Sun, 22 Dec 2019 17:27:30 +0000 (12:27 -0500)]
gtk-demo: Add more scrolling benchmarks

Add a listview and gridview to the scrolling
benchmarks.

5 years agoMerge branch 'ebassi/annotations' into 'master'
Emmanuele Bassi [Sun, 31 May 2020 15:18:36 +0000 (15:18 +0000)]
Merge branch 'ebassi/annotations' into 'master'

Ebassi/annotations

See merge request GNOME/gtk!1996

5 years agoDrop fallback-c89.c
Christoph Reiter [Sun, 31 May 2020 14:06:07 +0000 (16:06 +0200)]
Drop fallback-c89.c

We require a C compiler supporting C99 now. The main purpose of
these fallbacks was for MSVC. From what I can see this is now all supported
by MSVC 2015+ anyway.

The only other change this includes is to replace isnanf() with the
(type infering) C99 isnan() macro, because MSVC doesn't provide isnanf().

5 years agocolumnviewcolumn: Add a visible property
Matthias Clasen [Mon, 16 Dec 2019 19:01:42 +0000 (14:01 -0500)]
columnviewcolumn: Add a visible property

This lets us hide columns, which is an expected
feature of columned lists.

5 years agoAnnotate the GtkFunctionListItemFactory constructor
Emmanuele Bassi [Sun, 31 May 2020 14:14:26 +0000 (15:14 +0100)]
Annotate the GtkFunctionListItemFactory constructor

But skip it, since it cannot really be used by language bindings, as it
binds the same user data to two separate functions.

5 years agoFix annotations for gtk_cclosure_expression_new()
Emmanuele Bassi [Sun, 31 May 2020 14:10:27 +0000 (15:10 +0100)]
Fix annotations for gtk_cclosure_expression_new()

Missing scope annotations for the various functions.

5 years agoMerge branch 'columnview-1' into 'master'
Matthias Clasen [Sun, 31 May 2020 14:06:31 +0000 (14:06 +0000)]
Merge branch 'columnview-1' into 'master'

Convert the inspector to column views

See merge request GNOME/gtk!1994

5 years agoAdd missing separator
Emmanuele Bassi [Sun, 31 May 2020 14:05:59 +0000 (15:05 +0100)]
Add missing separator

An annotation is separated from the description by a ':'.

5 years agodocs: Fix annotations
Emmanuele Bassi [Sun, 31 May 2020 14:04:51 +0000 (15:04 +0100)]
docs: Fix annotations

 - Use the same name for the argument in the declaration, definition,
   and documentation
 - Use "optional" instead of the deprecated "allow-none"

5 years agofallback-c89: Try to make isnanf work
Christoph Reiter [Sun, 31 May 2020 13:09:31 +0000 (15:09 +0200)]
fallback-c89: Try to make isnanf work

5 years agoinspector: Touch up list styling
Matthias Clasen [Sun, 8 Dec 2019 17:53:46 +0000 (12:53 -0500)]
inspector: Touch up list styling

This is just the minimal amount of work to make
headers recognizable.

5 years agoinspector: Use a column view for actions
Matthias Clasen [Sun, 8 Dec 2019 06:09:59 +0000 (01:09 -0500)]
inspector: Use a column view for actions

A straight conversion from list box to column view.

5 years agoinspector: Make the resource list sortable
Matthias Clasen [Sun, 8 Dec 2019 21:02:14 +0000 (16:02 -0500)]
inspector: Make the resource list sortable

This is using a GtkTreeListRowSorter to keep expanded
state of the tree while changing the sorting.

5 years agoinspector: Use a column view for the resource list
Matthias Clasen [Sun, 8 Dec 2019 03:26:35 +0000 (22:26 -0500)]
inspector: Use a column view for the resource list

A conversion from tree view to column view.

5 years agoinspector: Use a column view for properties
Matthias Clasen [Tue, 3 Dec 2019 02:00:22 +0000 (21:00 -0500)]
inspector: Use a column view for properties

Just a straight conversion from list box to column view.

5 years agoinspector: Add columns to the object tree
Matthias Clasen [Wed, 18 Dec 2019 04:51:11 +0000 (23:51 -0500)]
inspector: Add columns to the object tree

Add columnview columns in the object tree.
We do the same for treeview columns.

5 years agoMerge branch 'fix-mnemonic-zero' into 'master'
Matthias Clasen [Sun, 31 May 2020 13:02:51 +0000 (13:02 +0000)]
Merge branch 'fix-mnemonic-zero' into 'master'

label: Fix mnemonic zero

Closes #2805

See merge request GNOME/gtk!1993

5 years agoUpdate Ukrainian translation
Yuri Chornoivan [Sun, 31 May 2020 06:12:49 +0000 (06:12 +0000)]
Update Ukrainian translation

5 years agoUpdate Ukrainian translation
Yuri Chornoivan [Sun, 31 May 2020 06:09:05 +0000 (06:09 +0000)]
Update Ukrainian translation

5 years agoMerge branch 'dropdown-for-merge' into 'master'
Matthias Clasen [Sun, 31 May 2020 05:34:18 +0000 (05:34 +0000)]
Merge branch 'dropdown-for-merge' into 'master'

Dropdown for merge

Closes #2214

See merge request GNOME/gtk!1992

5 years agoMerge branch 'listview-for-merge' into 'master'
Matthias Clasen [Sun, 31 May 2020 05:32:37 +0000 (05:32 +0000)]
Merge branch 'listview-for-merge' into 'master'

Listview for merge

Closes #2214

See merge request GNOME/gtk!1991

5 years agolabel: Fix mnemonic zero
Matthias Clasen [Sun, 31 May 2020 01:40:20 +0000 (21:40 -0400)]
label: Fix mnemonic zero

We were confusing '\0' and '0' when parsing the label
for mnemonics.

Fixes: #2805
5 years agoAdd some tests for new GtkBuilder syntax
Matthias Clasen [Wed, 18 Dec 2019 22:34:38 +0000 (17:34 -0500)]
Add some tests for new GtkBuilder syntax

Some valid and invalid examples for <closure>,
<lookup> and <constant>.

5 years agodocs: Update the list widget overview
Matthias Clasen [Sat, 30 May 2020 18:24:34 +0000 (14:24 -0400)]
docs: Update the list widget overview

Fill in the GtkComboBox and GtkCellView replacements
in the quick reference table.

5 years agogtk-demo: Add a large grid demo
Matthias Clasen [Sat, 14 Dec 2019 18:32:55 +0000 (13:32 -0500)]
gtk-demo: Add a large grid demo

This is similar to the flowbox demo, but much bigger.

5 years agoinspector: Use dropdowns in the visual page
Matthias Clasen [Sat, 14 Dec 2019 05:50:26 +0000 (00:50 -0500)]
inspector: Use dropdowns in the visual page

Convert everything in the visual page to dropdowns.

5 years agoinspector: Use a dropdown for size groups
Matthias Clasen [Sat, 14 Dec 2019 03:50:14 +0000 (22:50 -0500)]
inspector: Use a dropdown for size groups

Use a GtkDropDown for the modes of size groups.

5 years agoinspector: Use a dropdown for controllers
Matthias Clasen [Sat, 14 Dec 2019 03:33:13 +0000 (22:33 -0500)]
inspector: Use a dropdown for controllers

Use a GtkDropDown for the phases of event controllers.

5 years agoinspector: Use a dropdown for attribute mapping
Matthias Clasen [Sat, 14 Dec 2019 03:12:15 +0000 (22:12 -0500)]
inspector: Use a dropdown for attribute mapping

Use a GtkDropDown for the attribute mapping editor.

5 years agoinspector: Use dropdowns in property editor
Matthias Clasen [Fri, 13 Dec 2019 21:19:53 +0000 (16:19 -0500)]
inspector: Use dropdowns in property editor

Replace combo boxes by dropdowns in the property editor.

5 years agofilechooser: Use a dropdown for choices
Matthias Clasen [Sun, 22 Dec 2019 02:06:50 +0000 (21:06 -0500)]
filechooser: Use a dropdown for choices

5 years agofilechooser: Use a dropdown for the filter combo
Matthias Clasen [Sun, 22 Dec 2019 01:12:11 +0000 (20:12 -0500)]
filechooser: Use a dropdown for the filter combo

Replace an internal use of GtkComboBox with GtkDropDown.

5 years agoAdd GtkDropDown
Matthias Clasen [Mon, 9 Dec 2019 01:22:06 +0000 (20:22 -0500)]
Add GtkDropDown

This is a simple drop down control using list models.

5 years agoxxx: isnanf() is some wtf
Benjamin Otte [Sun, 24 May 2020 22:07:07 +0000 (00:07 +0200)]
xxx: isnanf() is some wtf

5 years agobuilderlistitemfactory: Precompile the xml
Matthias Clasen [Mon, 23 Dec 2019 23:23:59 +0000 (18:23 -0500)]
builderlistitemfactory: Precompile the xml

This is the one place where we can really take advantage
of precompiling, since we instantiate this template
over and over.

5 years agogtk-demo: Use single-click-activate for minesweeper
Matthias Clasen [Sat, 30 May 2020 18:50:22 +0000 (14:50 -0400)]
gtk-demo: Use single-click-activate for minesweeper

The explanation say we do, so do it.

5 years agoSpread single-click-activate api
Matthias Clasen [Mon, 23 Dec 2019 20:22:35 +0000 (15:22 -0500)]
Spread single-click-activate api

This makes sense to have in all the views,
not just GtkListView.

5 years agodocs: Add a listview overview section
Matthias Clasen [Fri, 29 May 2020 20:10:34 +0000 (16:10 -0400)]
docs: Add a listview overview section

Add a conceptual overview for all the listmodel-based
widgets.

Fixes: #2214
5 years agogtk-demo: Add filtering to the settings demo
Matthias Clasen [Mon, 16 Dec 2019 04:48:34 +0000 (23:48 -0500)]
gtk-demo: Add filtering to the settings demo

A demo of filtering with lists was missing so far.

5 years agogtk-demo: Demo columnview sorting
Matthias Clasen [Sat, 14 Dec 2019 16:53:24 +0000 (11:53 -0500)]
gtk-demo: Demo columnview sorting

Enhance the settings demo to have a sortable column.

5 years agogtk-demo: Cosmetic improvements to the listview demos
Matthias Clasen [Fri, 29 May 2020 17:25:36 +0000 (13:25 -0400)]
gtk-demo: Cosmetic improvements to the listview demos

Set default sizes, window titles and add more
detail to the descriptions.

5 years agogtk-builder-tool: Minimally validate <binding>
Matthias Clasen [Wed, 18 Dec 2019 21:58:10 +0000 (16:58 -0500)]
gtk-builder-tool: Minimally validate <binding>

Check that the toplevel property name is legit.

5 years agotestsuite: Add tests for GtkTreeListSorter
Benjamin Otte [Wed, 18 Dec 2019 04:39:04 +0000 (05:39 +0100)]
testsuite: Add tests for GtkTreeListSorter

5 years agoAdd GtkTreeListRowSorter
Matthias Clasen [Sun, 8 Dec 2019 22:34:10 +0000 (17:34 -0500)]
Add GtkTreeListRowSorter

This is a special-purpose sorter that can
apply the sorting of another sorter to the
levels of a GtkTreeListModel.

5 years agotestcolumnview: Add sorters
Benjamin Otte [Tue, 17 Dec 2019 14:35:24 +0000 (15:35 +0100)]
testcolumnview: Add sorters

5 years agocolumn view title: Show sort indicators
Matthias Clasen [Wed, 4 Dec 2019 13:52:12 +0000 (08:52 -0500)]
column view title: Show sort indicators

5 years agocolumnview: Add a sort-by api
Matthias Clasen [Wed, 4 Dec 2019 02:31:57 +0000 (21:31 -0500)]
columnview: Add a sort-by api

5 years agocolumnview: Add sorting
Matthias Clasen [Wed, 4 Dec 2019 13:13:13 +0000 (08:13 -0500)]
columnview: Add sorting

This is a somewhat large commit that:

- Adds GtkColumnViewSorter
This is a special-purpose, private sorter implementation which sorts
according to multiple sorters, allowing each individual sorter to be
inverted. This will be used with clickable column view headers.

- Adds a read-only GtkColumnView::sorter property
The GtkColumnView creates a GtkColumnViewSorter at startup that it uses
for this property.

- Adds a writable GtkColumnViewColumn::sorter property
This allows defining per-column sorters. Whenever an application sets a
sorter for a column, the header becomes clickable and whenever
a header is clicked, that column's sorter is prepended to the list of
sorters, unless it is already the first sorter, in which case we invert
its order. No column can be in the list more than once.

5 years agolistview: Add single-click-activate
Matthias Clasen [Sat, 14 Dec 2019 01:57:57 +0000 (20:57 -0500)]
listview: Add single-click-activate

Add a single-click-activate property to GtkListView.

5 years agolistitemwidget: Add single-click-activate
Matthias Clasen [Sat, 14 Dec 2019 01:56:32 +0000 (20:56 -0500)]
listitemwidget: Add single-click-activate

Add a mode to GtkListItemWidget that activates on
single click and selects on hover. Make
GtkListItemManager set this on its items
when its own 'property' of the same name is set.

5 years agobuilder-tool: Pass through CDATA where it makes sense
Matthias Clasen [Fri, 13 Dec 2019 19:03:20 +0000 (14:03 -0500)]
builder-tool: Pass through CDATA where it makes sense

This avoids a ton of escaping for
GtkBuilderListItemFactory::bytes.

5 years agodocs: Reorganize list widgets in their own chapter
Matthias Clasen [Fri, 13 Dec 2019 03:45:43 +0000 (22:45 -0500)]
docs: Reorganize list widgets in their own chapter

5 years agofontchooserwidget: Port to listmodels
Benjamin Otte [Thu, 28 Nov 2019 03:00:39 +0000 (04:00 +0100)]
fontchooserwidget: Port to listmodels

The port is kind of evil, in that it stores either a PangoFontFamily or a
PangoFontFace in the list, depending on if the fontchooser is configured
to select fonts or faces.
It also does not cache the font description anymore, so more calls to
pango_font_describe() may happen.

If both of these issues turn out problematic, the fontchooser would need
to resurrect GtkDelayedFontDescription again and put objects of that
type through the model.

These changes depend on Pango 1.46's introduction of listmodels and
various new getters, so the dependency has been upgraded.

5 years agoAdd some tests for expression binding
Matthias Clasen [Sat, 14 Dec 2019 20:36:34 +0000 (15:36 -0500)]
Add some tests for expression binding

In particular, test that expressios can deal with object == this.

5 years agoexpression: Allow passing a this object to bind()
Benjamin Otte [Thu, 28 Nov 2019 01:32:12 +0000 (02:32 +0100)]
expression: Allow passing a this object to bind()

This gives a bit more control over the arguments passed to expressions.

5 years agogtk-demo: Add a Clocks demo
Benjamin Otte [Sun, 24 Nov 2019 07:07:33 +0000 (08:07 +0100)]
gtk-demo: Add a Clocks demo

This demo is meant to showcase expressions.

It also needs the fixes in glib 2.64 to work properly.

5 years agoxxx: Add a hack to make paintables transform to/from objects
Benjamin Otte [Tue, 26 Nov 2019 05:09:20 +0000 (06:09 +0100)]
xxx: Add a hack to make paintables transform to/from objects

See also: https://gitlab.gnome.org/GNOME/glib/merge_requests/1251

5 years agoinspector: Remove private struct for prop editor
Benjamin Otte [Sat, 9 Nov 2019 00:13:28 +0000 (01:13 +0100)]
inspector: Remove private struct for prop editor

5 years agoinspector: Make Controller page a GtkWidget
Benjamin Otte [Fri, 8 Nov 2019 23:43:41 +0000 (00:43 +0100)]
inspector: Make Controller page a GtkWidget

5 years agoinspector: Remove private struct from controllers
Benjamin Otte [Fri, 8 Nov 2019 23:36:59 +0000 (00:36 +0100)]
inspector: Remove private struct from controllers

5 years agocolumnview: Add header
Benjamin Otte [Fri, 8 Nov 2019 20:23:03 +0000 (21:23 +0100)]
columnview: Add header

This uses a custom GtkColumnViewTitle widget. So far that widget is
pretty boring, but that will change once we added
resizing, reordering, dnd, sorting, hiding/showing of columns or
whatever UIs we want.

5 years agotests: Add testcolumnview
Benjamin Otte [Mon, 28 Oct 2019 19:50:25 +0000 (20:50 +0100)]
tests: Add testcolumnview

5 years agocolumnview: Add a custom LayoutManager
Benjamin Otte [Thu, 7 Nov 2019 22:40:47 +0000 (23:40 +0100)]
columnview: Add a custom LayoutManager

The ColumnView now allocates column widths first and then the individual
rows use the new layout manager which looks at the column allocations to
allocate their children.

5 years agoconstraint-editor: Don't poke around in widget internals
Benjamin Otte [Thu, 7 Nov 2019 17:56:52 +0000 (18:56 +0100)]
constraint-editor: Don't poke around in widget internals

5 years agocolumnview: Fix styling with Adwaita
Benjamin Otte [Thu, 7 Nov 2019 11:17:53 +0000 (12:17 +0100)]
columnview: Fix styling with Adwaita

- Use "treeview" as the node name
- Add .view style class

5 years agoinspector: Port object tree to GtkColumnView
Benjamin Otte [Tue, 5 Nov 2019 16:10:29 +0000 (17:10 +0100)]
inspector: Port object tree to GtkColumnView

5 years agocolumnview: Add GtkColumnViewCell
Benjamin Otte [Sat, 2 Nov 2019 05:15:38 +0000 (06:15 +0100)]
columnview: Add GtkColumnViewCell

It's a GtkListItemWidget subclass that tracks the column it belongs to
and allows the column to track it.

We also use this subclass to implement sizing support so columns share
the same size and get resized in sync.

5 years agowidget: Add a hook for resizes
Benjamin Otte [Mon, 4 Nov 2019 23:40:17 +0000 (00:40 +0100)]
widget: Add a hook for resizes

It's private, no APIs, we don't talk about it. But we will start using
it very soon, so we can do size request caching in columns and avoid
sizegroups...

5 years agocolumnview: Implement GtkScrollable
Benjamin Otte [Thu, 31 Oct 2019 02:16:45 +0000 (03:16 +0100)]
columnview: Implement GtkScrollable

Just forward it to the listview for now.

5 years agocolumnview: Add listitems for the columns
Benjamin Otte [Wed, 30 Oct 2019 17:03:23 +0000 (18:03 +0100)]
columnview: Add listitems for the columns

They are not aligned in columns yet, but they do exist.

5 years agolistitemwidget: Lazily create listitems
Benjamin Otte [Sun, 3 Nov 2019 02:59:04 +0000 (03:59 +0100)]
listitemwidget: Lazily create listitems

We only create them in root/unroot (they should be created in
appear/disappear, but that vfunc doesn't exist yet), that way we can
avoid expensive work while the widget isn't used for anything.

5 years agolistitem: Move position/item/selected tracking to widget
Benjamin Otte [Sun, 3 Nov 2019 02:34:56 +0000 (03:34 +0100)]
listitem: Move position/item/selected tracking to widget

This way, we can ensure it's always there when we need it (before the
item gets created) and gone when we don't (if some GC language holds on
to the item after we've destroyed the widget).

5 years agolistitemwidget: Add a private struct
Benjamin Otte [Sun, 3 Nov 2019 02:17:37 +0000 (03:17 +0100)]
listitemwidget: Add a private struct

I had to rename the item property to list_item anyway, so I could just
do the next step with it.

5 years agolistitemfactory: Simplify
Benjamin Otte [Sun, 3 Nov 2019 01:23:46 +0000 (02:23 +0100)]
listitemfactory: Simplify

Instead of 6 vfuncs, we now have 3 and rely on the factory keeping track
of what it needs to do.

We're doing lots of dancing from one object to another here, but this
will hopefully get simpler with further commits.

5 years agolistitemfactory: Reorganize vfuncs
Benjamin Otte [Sat, 2 Nov 2019 17:56:36 +0000 (18:56 +0100)]
listitemfactory: Reorganize vfuncs

Instead of bind/rebind/update/unbind, we now just have update, and the
factories get to interpret that in the way they want.

5 years agolistitem: Make this a GObject
Benjamin Otte [Fri, 1 Nov 2019 06:31:38 +0000 (07:31 +0100)]
listitem: Make this a GObject

This splits GtkListItem into 2 parts:

1. GtkListItem
   This is purely a GObject with public API for developers who want to
   populate lists. There is no chance to cause conflict with GtkWidget
   properties that the list implementation assumed control over and
   defines a clear boundary.
2. GtkListItemWidget
   The widget part of the listitem. This is not only fully in control of
   the list machinery, the machinery can also use different widget
   implementations for different list widgets like I inted to for
   GtkColumnView.

5 years agobuilder: Make gtk_builder_extend_with_template() work with objects
Benjamin Otte [Fri, 1 Nov 2019 06:30:32 +0000 (07:30 +0100)]
builder: Make gtk_builder_extend_with_template() work with objects

This will be relevant later when we introduce GtkListItem which is not a
GtkWidget.

5 years agogtk-demo: Add a Coverflow application launcher
Benjamin Otte [Tue, 29 Oct 2019 05:35:46 +0000 (06:35 +0100)]
gtk-demo: Add a Coverflow application launcher

This is roughly the simplest demo I could come up with.

But I documented it, so there's your tutorial.

Related: #2214

5 years agoAdd GtkSignalListItemFactory
Benjamin Otte [Tue, 29 Oct 2019 04:58:02 +0000 (05:58 +0100)]
Add GtkSignalListItemFactory

So the poor Rust users can actually use this.

I would totally not use this ever!

5 years agocolumnview: Allow adding/removing columns
Benjamin Otte [Mon, 28 Oct 2019 19:50:49 +0000 (20:50 +0100)]
columnview: Allow adding/removing columns

... and make that work in UI files via <child>, too.

5 years agogtk-demo: Add a minesweeper demo
Benjamin Otte [Mon, 28 Oct 2019 08:47:52 +0000 (09:47 +0100)]
gtk-demo: Add a minesweeper demo

The demo shows creating ones own listmodel and using it to fill a grid.

I am totally getting the hang of React btw:
500 lines of logic with no UI code and 100 lines of GtkBuilder XML and
I get a sweet UI.

5 years agoAdd GtkColumnView skeleton
Benjamin Otte [Mon, 28 Oct 2019 00:18:14 +0000 (01:18 +0100)]
Add GtkColumnView skeleton

It's just a copy/paste of the listview code with all the internals
gutted. The code doesn't do anything.

5 years agowip: Add GtkCoverFlow
Benjamin Otte [Sun, 27 Oct 2019 07:03:03 +0000 (08:03 +0100)]
wip: Add GtkCoverFlow

The widget mostly works out of the box, but some tweaking may be
necessary (in particular in the theme) and the gtk-demo changes might
require removing before this is production-ready.

5 years agolistbase: Take over anchor handling
Benjamin Otte [Sat, 26 Oct 2019 06:49:27 +0000 (08:49 +0200)]
listbase: Take over anchor handling

With that, pretty much all code but allocating the widgets is gone from
the gridview and listview.

5 years agolistbase: Add vfuncs to convert positions to/from coordinates
Benjamin Otte [Fri, 25 Oct 2019 05:39:57 +0000 (07:39 +0200)]
listbase: Add vfuncs to convert positions to/from coordinates

... and use that to implement PageUp/PageDown.

With that, all keyboard handling has been moved to GtkListBase.

5 years agolistbase: Move focus moving keybindings here
Benjamin Otte [Thu, 24 Oct 2019 04:49:38 +0000 (06:49 +0200)]
listbase: Move focus moving keybindings here

The focus tracker is not yet moved because that depends on scroll_to()
support and we don't have that yet.
Whoops.
So we use a hack.

5 years agoRemove gtk_selection_model_user_select_item() again
Benjamin Otte [Thu, 24 Oct 2019 00:14:34 +0000 (02:14 +0200)]
Remove gtk_selection_model_user_select_item() again

This reverts commit 6a164ab306dad9096bde736c907494c71086d3c4.

The function was awkward and we now have only one caller again, so we
can fold it back into it.

5 years agolistbase: Move orientable implementation here
Benjamin Otte [Thu, 24 Oct 2019 00:07:37 +0000 (02:07 +0200)]
listbase: Move orientable implementation here